class CallEg {
    
    public void methodA() throws ArithmeticException { 
        try { 
            methodB();
        } catch (ArithmeticException oops) {
            oops.printStackTrace(); throw oops;
        }
    }
    
    public void methodB() throws ArithmeticException {
        try { 
            methodC();
        } catch (ArithmeticException oops) {
            oops.printStackTrace(); throw oops;
        }
    }
    
    public void methodC() throws ArithmeticException { 
        try { 
            int x=3; x/=0; 
        } catch (ArithmeticException oops) {
            oops.printStackTrace(); throw oops;
        }
    }
}


public class Aufgabe3 {

    public static void main(String[] args) {
        CallEg eg = new CallEg(); // use default constructor
        try {
            eg.methodA();
        } catch (ArithmeticException oops) {
            oops.printStackTrace();
        }
    }

}
